Method for sharpening a digital image

ABSTRACT

A method of sharpening a digital image having image pixels values includes the steps of: determining a D min  value, representing a value corresponding to a minimum possible exposure for a system that produced the digital image; for each pixel value in the digital image providing a gain factor that is dependent on the difference between the pixel value and the D min  value, such that pixel values nearer the D min  value have smaller gain factors; and using the gain factors to sharpen the digital image.

FIELD OF THE INVENTION

[0001] The invention relates generally to the field of digital image processing and, more particularly, to a method of image sharpening.

BACKGROUND OF THE INVENTION

[0002] In processing a digital image, it is common to sharpen the image and enhance fine detail with sharpening algorithms. Typically, sharpening is performed by a convolution process (for example, see A. K. Jain, Fundamentals of Digital Image Processing, Prentice-Hall: 1989, pp. 249-251). The process of unsharp masking is an example of a convolution-based sharpening process. For example, sharpening an image with unsharp masking can be described by the equation:

s(x,y)=i(x,y)**b(x,y)+βf(i(x,y)−i(x,y)**b(x,y))  (0)

[0003] where:

[0004] s(x,y)=output image with enhanced sharpness

[0005] i(x,y)=original input image

[0006] b(x,y)=lowpass filter

[0007] β=unsharp mask gain factor

[0008] f( )=fringe function

[0009] ** denotes two dimensional convolution

[0010] (x,y) denotes the x^(th) row and the y^(th) column of an image

[0011] Typically, an unsharp image is generated by convolution of the image with a lowpass filter (i.e., the unsharp image is given by i(x,y)**b(x,y)). Next, the highpass, or fringe data is generated by subtracting the unsharp image from the original image (i.e., the highpass data is found with i(x,y)−i(x,y)**b(x,y)). This highpass data is then modified by either a gain factor 62 or a fringe function f( ) or both. Finally, the modified highpass data is summed with either the original image or the unsharp image to produce a sharpened image.

[0012] A similar sharpening effect can be achieved by modification of the image in the frequency domain (for example, the FFT domain) as is well known in the art of digital signal processing.

[0013] One problem associated with image sharpening is noise amplification. Noise amplification can be a special problem when sharpening a digital image originating from film. Specifically, image regions originally receiving little or no light exposure (also called D_(min)) on the film can appear quite noisy when the image is sharpened.

[0014] Curlander (in “Image Enhancement Using Digital Adaptive Filtering,” Master's Thesis, Massachusetts Institute of Technology, 1977, p. 30-34, 48-49, 63,72-73, 93-94) describes methods of sharpening a digital image, where the highpass gain factor is determined from the lowpass signal value, the local contrast, or the highpass signal value. Curlander did not describe sharpening of a rendered image in such a way as to minimize the amplification of image D_(min) noise.

[0015] For photographic negatives, the areas of the film receiving no exposure have a minimum density called D_(min). D_(min) is also sometimes referred to as mask or base density. Underexposed film images typically have image areas containing D_(min). It is common to use the value of D_(min) in the processing of digital images for the purpose of improving image quality. For example, in U.S. Pat. No. 5,081,485 issued Jan. 14, 1992, Terashita describes a method of using a mask density to improve the exposure estimate for an image. To this end, the mask density is subtracted from the average density. This increases the robustness of the determined color balance by decreasing the variability between different color negative films. However, Terashita's method does not ensure that regions of an image sensing device receiving little or no light exposure are specially handled to reduce the sharpening of noise.

[0016] It is occasionally desirable to sharpen different regions or pixels of the image by different amounts. For example, is it has been suggested that it is desirable to sharpen the pixels representing human faces to a lesser degree than pixels representing a building. For example, in U.S. Pat. No. 5,682,443 issued Oct. 28, 1997, Gouch et al. describe the modification of the gain of the unsharp mask based on the color of a pixel (and the color of the surrounding neighborhood). Gouch does not consider the undesirable noise amplification of D_(min) regions that accompanies the image sharpening.

[0017] Alternatively, in U.S. Pat. No. 4,571,635 issued Feb. 18, 1986, Mahmoodi et al. teach a method of deriving a gain factor β that is used to scale the high frequency information of the digital image depending on the standard deviation of the image pixels within a neighborhood. In addition, in U.S. Pat. No. 5,081,692 issued Jan. 14, 1992, Kwon et al. teach that a gain factor β is based on a center weighted variance calculation. In U.S. Pat. No. 4,761,819 issued Aug. 2, 1988, Denison et al. describe a method where the gain factor of an unsharp mask is dependent on both a local variance calculation and a noise statistic. While these methods do indeed sharpen the image while attempting to minimize noise amplification, they are computationally complex. In addition, these methods do not explicitly consider the D_(min) region of the image, and therefore some D_(min) noise is amplified.

[0018] Shimazaki in U.S. Pat. No. 5,051,842 issued Sep. 24, 1991, describes an apparatus which generates unsharp signals from images, derives two parameters based on either the image signal level or the unsharp signal level from a pre-determined lookup table, multiplies one parameter with the image signal, multiplies the other parameter with the unsharp signal, and adds the two resulting signals to obtain the final image signal. One embodiment requires that the sum of the two parameters equal one for all image signal levels. In this case, the method is mathematically equivalent to the unsharp mask equation. Shimazaki teaches that the two parameters are signal dependent with the signals representing image highlights resulting in the highest degree of sharpening. The two parameters are chosen such that the sharpening decreases as either the image signal or the unsharp signal decreases until the sharpening level is zero. At that point, the sharpening converts to blurring as the image signal or unsharp signal continue to decrease into the shadow region of the density range. Shimazaki's apparatus suffers from not accounting explicitly for the D_(min) density level.

[0019] Gallagher et al. in U.S. Pat. No. 6,167,165 issued Dec. 26, 2000, describe a method of selecting a gain for an unsharp mask based on a local intensity level. While this method does demonstrate an unsharp mask gain having dependence on local intensity, is does not describe sharpening in such a manner as to de-emphasize D_(min) noise.

[0020] Keyes et al. in U.S. Pat. No. 6,091,861 issued Jul. 18, 2000, and Matama in U.S. Pat. No. 6,384,937 issued May 7, 2002, both describe methods of selecting a constant, position independent gain factor based on the exposure of the image. Lower gain factors will be selected for images that are underexposed, thereby providing less gain for that image than for a normally exposed image. These methods are insufficient to handle scenarios where an image contains both underexposed (or D_(min)) regions and normally exposed regions. Since a single gains factor is selected for the entire image, either the underexposed region or the normally exposed region will be sharpened with a sub-optimal gain factor.

[0021] Further complicating the problem of D_(min) noise being amplified by sharpening is that it is typical for an imaging system to sharpen a rendered image. Rendering, or mapping input image densities to output media densities on the output media occurs in both digital imaging and optical imaging and is well known to those skilled in the art. U.S. Pat. No. 6,097,470 issued Aug. 1, 2000 to Buhr et al., describes image rendering. It is difficult to determine the areas of a rendered digital image that correspond to the D_(min) of the film. This is because a black portion of a rendered digital image could originate from a D_(min) portion of the film, or it could originate from a normally exposed portion of the film. Thus, it is difficult to avoid amplifying the D_(min) noise when sharpening a rendered image. U.S. patent application Ser. No. 09/981,176, filed Oct. 17, 2001, describes a method of determining the propagated value of D_(min) in a rendered image, but there is no mention of using that propagated D_(min) value to aid in the sharpening of the rendered image. In addition, none of the previously mentioned sharpening methods describes sharpening a rendered image such that the D_(min) noise is not amplified.

[0022] Therefore, there exists a need for an improved image sharpening method that adjusts the amount of sharpening while avoiding amplifying D_(min) noise.

SUMMARY OF THE INVENTION

[0023] The need is met according to the present invention by providing a method of sharpening a digital image having image pixels values that includes the steps of: determining a D_(min) value, representing a value corresponding to a minimum possible exposure for a system that produced the digital image; for each pixel value in the digital image providing a gain factor that is dependent on the difference between the pixel value and the D_(min) value, such that pixel values nearer the D_(min) value have smaller gain factors; and using the gain factors to sharpen the digital image.

ADVANTAGES

[0024] The present invention has the advantage of producing sharper images without amplifying noise associated with the portion of film receiving little or no light exposure (also called D_(min)).

BRIEF DESCRIPTION OF THE DRAWINGS

[0025]FIG. 1 is a block diagram illustrating a technique for sharpening an original image according to a first embodiment of the invention;

[0026]FIG. 2 is a plot of the gain LUT β_(LUT)[x];

[0027]FIG. 3 is a block diagram illustrating a technique for sharpening a rendered image according to a second embodiment of the invention;

[0028]FIG. 4 is a block diagram of an image processing path composed of M image transforms;

[0029]FIG. 5 is an exemplary image processing path;

[0030]FIG. 6 is an example plot of a rendering LUT;

[0031]FIG. 7 is a block diagram illustrating a technique for sharpening a rendered image according to a third embodiment of the invention; and

[0032]FIGS. 8A and B are plots of rendered gain LUTs β_(R) _(—) _(LUT)[x], made by propagating the gain LUT through two different image processing paths.

DETAILED DESCRIPTION OF THE INVENTION

[0033] In the following description, an embodiment of the present invention will be described as a method implemented as a software program. Those skilled in the art will readily recognize that the equivalent of such software may also be constructed in hardware. Because image enhancement algorithms and methods are well known, the present description will be directed in particular to elements forming part of, or cooperating more directly with, the method and system in accordance with the present invention. Other elements, and hardware and/or software for producing and otherwise processing the image signals, not specifically shown or described herein, may be selected from such materials, components and elements known in the art. Given the system and method as shown and described according to the invention in the following materials, software not specifically shown, described or suggested herein that is useful for implementation of the invention is conventional and within the ordinary skill in such arts.

[0034] Still further, as used herein, the computer program may be stored in a computer readable storage medium, which may comprise, for example; magnetic storage media such as a magnetic disk (such as a hard drive or a floppy disk) or magnetic tape; optical storage media such as an optical disc, optical tape, or machine readable bar code; solid state electronic storage devices such as random access memory (RAM), or read only memory (ROM); or any other physical device or medium employed to store a computer program.

[0035] A digital image typically includes one or more two-dimensional arrays of numbers. For example, a color digital image may include three arrays representing red, green, and blue pixel values respectively, or a monochrome image may include one array of pixel values corresponding to light intensities. With regard to matters of nomenclature, the value of a pixel of a digital image located at coordinates (x,y), referring to the x^(th) row and the y^(th) column of a digital image, shall herein comprise a triad of values [r(x,y), g(x,y), b(x,y)] respectively referring to the values of the red, green and blue digital image channels at location (x,y). In this regard, a digital image may be considered as comprising a certain number of digital image channels. In the case of a digital image comprising red, green and blue two-dimensional arrays, the image comprises three channels, namely, red, green and blue spectral channels.

[0036] In general, the present invention describes a method of sharpening an image where the sharpening amount (applied to any local region of the image) is dependent on the noise characteristics of the source image signal. Specifically, the present invention is useful for digital images from a film source. The present invention ensures that image regions near D_(min) in the source image have reduced sharpening, thereby reducing noise visibility.

[0037] Referring to FIG. 1, parameters are input to the LUT generator 4 for creating a LUT (Look-Up-Table) β_(LUT[ ]) that defines the relationship between the sharpening gain factor β and the intensity of the digital image. Those skilled in the art will recognize that the output of the LUT generator 4 could be a mathematical function just as easily as a LUT. The method of creating the LUT will be described hereinbelow.

[0038] The LUT generator 4 preferably creates the gain LUT using the following equation (1)

If (x<X _(min))β_(LUT) [x]=Y _(min)  (1)

Else If (x>X _(max))β_(LUT) [x]=Y _(max)

Else β_(LUT) [x]=Y _(min)+(Y _(max) −Y _(min))(0.5+0.5*sin((x−X _(min))/(X _(max) −X _(min))π−π/2)

[0039] Where:

[0040] X_(min) is set to the value of D_(min). D_(min) represents a value corresponding to a minimum possible exposure for a system that produced the digital image. D_(min) can be determined by using the system to capture a reference dark scene (for example an exposure in a camera without removing a lens cap) and averaging the digital values derived from the reference dark exposure. The average is taken because pixel values can contain noise, resulting in pixel values slightly above and below the actual D_(min) values. The process of averaging removes the fluctuations due to noise.

[0041] X_(max) is a user selectable parameter and represents a pixel value above which the sharpening gain factor is constantly the maximum gain factor Y_(max).

[0042] Y_(min) is a user selectable parameter and represents a minimum gain factor (i.e. the gain factor for D_(min) regions of the image. )

[0043] Y_(max) is a user selectable parameter and represents a maximum gain factor.

[0044] The values of Xmax, Ymin and Ymax are arrived at empirically by processing, printing and viewing prints to determine optimal values for these parameters.

[0045]FIG. 2 shows a plot of β_(LUT)[x] using illustrative values of X_(min)=279, X_(max)=579, Y_(min)=1.0, and Y_(max)=3.0. Those skilled in the art will recognize that many similar functions can be constructed that will result in lower values of β_(LUT[ ]) in the neighborhood of D_(min) to ensure that D_(min) noise is not overly-amplified, and higher values elsewhere. As shown in FIG. 2, the function represented by β_(LUT[ ]) is a monotonic function of pixel value that increases from the D_(min) value (X_(min)) to a predetermined pixel value (X_(max)) and is constant for pixel values that exceed the predetermined pixel value.

[0046] Referring back to FIG. 1, an original image 2 i(x,y) having x_(o) rows and y_(o) columns is input to the image sharpener 6 for sharpening the image according to the gain LUT β_(LUT[ ]) produced by the LUT generator 4. Preferably, the image i(x,y) is of high resolution, for example, an illustrative high resolution image would have x_(o)=1024 rows of pixels by y_(o)=1536 columns of pixels. The original image may be a digitized version of a photographic film image, or a digital image captured by an electronic camera. The sharpener 6 receives the original image 2 and outputs a sharpened image 22. The operation of the image sharpener 6 can be described by the following equation (2).

s(x,y)=i(x,y)**b(x,y)+β(x,y)f(i(x,y)−i(x,y)**b(x,y))  (2)

[0047] where:

[0048] s(x,y)=output image with enhanced sharpness without amplifying D_(min) noise

[0049] i(x,y)=original input image

[0050] b(x,y)=lowpass filter

[0051] β(x,y)=unsharp mask gain factor for location (x,y). Preferably in the first embodiment, the gain factor is found with β(x,y)=β_(LUT)[i(x,y)**b(x,y)], where β_(LUT)[ ] is a look-up-table of gain factors.

[0052] f( )=fringe function

[0053] i(x,y)**b(x,y)=lowpass image (also called unsharp image)

[0054] i(x,y)−i(x,y)**b(x,y)=highpass image

[0055] ** denotes two dimensional convolution

[0056] (x,y) denotes the x^(th) row and the y^(th) column of an image

[0057] Preferably, the lowpass filter is a Gaussian lowpass filter. This Gaussian filter is a two-dimensional, circularly symmetric, low-pass filter whose filter coefficients may be derived by the following formula which is well known in the art: $\begin{matrix} {{b\left( {i,i} \right)} = {\frac{1}{\sigma \sqrt{2\pi}}{\exp \left\lbrack \frac{- \left( {i^{2} + i^{2}} \right)}{2\sigma^{2}} \right\rbrack}}} & (3) \end{matrix}$

[0058] where:

[0059] b(i,j)=the Gaussian filter coefficient at the (i,j)^(th) pixel

[0060] σ=the standard deviation of the Gaussian filter

[0061] π=the constant approximately 3.14159265 . . .

[0062] Preferably, the Gaussian filter is a 5 by 5 pixel filter made with σ=1. The filter coefficients are as follows:

[0063] [0.003 0.0133 0.0219 0.0133 0.003

[0064] 0.0133 0.0596 0.0983 0.0596 0.0133

[0065] 0.0219 0.0983 0.162 0.0983 0.0219

[0066] 0.0133 0.0596 0.0983 0.0596 0.0133

[0067] 0.003 0.0133 0.0219 0.0133 0.003])

[0068] The gain factor β(x,y) for each pixel value in the digital image is dependent on the difference between the pixel value and the D_(min) value, such that pixel values nearer the D_(min) value have smaller gain factors. The gain factors are used to sharpen the digital image as follows.

[0069] An unsharp image is generated by convolution of the image with a lowpass filter (i.e., the unsharp image is given by i(x,y)**b(x,y)). Next, the highpass, or fringe data is generated by subtracting the unsharp image from the original image (i.e., the highpass data is found with i(x,y)−i(x,y)**b(x,y)). This highpass data is then modified by the signal dependent gain factor β(x,y) and possibly a fringe function f( ). In the preferred embodiment, the fringe function is identity and can be omitted without effect. The gain factor β(x,y) is dependent on the value of the unsharp original image. Although in the embodiment as described, the gain factor is dependent on the unsharp image, those skilled in the art of image processing will realize that the gain factor β(x,y) could have been dependent on the original image or an unsharp image made with a different lowpass filter with similar effect. Finally, the modified highpass data is summed with the unsharp image to produce a sharpened image. (Those skilled in the art will recognize that this is equivalent with summing the modified highpass data to the original image, with an appropriate modification to the gain factors.)

[0070] Each channel of the digital image may be operated upon by the sharpener 6. In this case, it is preferred that the parameters X_(min), and X_(max), used by the LUT generator 4, be adjusted accordingly, as typical consumer films generally have different D_(min) values in each of the color channels (blue channel D_(min) is typically higher than green channel D_(min) which is typically higher than red channel D_(min)). Preferably, each color channel is treated in an independent manner.

[0071] Alternatively, it may sometimes be desirable for the gain factor to be fixed across color channels at each pixel location (x,y) throughout the image. This can be accomplished by taking the mean, median, minimum or some other combination of the determined gain factors at each pixel location.

[0072] As another alternative, a luminance channel is created as is commonly known in the art by making a linear combination of the image's color channels. Then, this single channel is input to the sharpener 6 for creating a sharpened output image. The luminance channel l(x,y) is created by linearly combining all the color channels of the image. For example: $\begin{matrix} {{l\left( {x,y} \right)} = {\sum\limits_{n = 0}^{n = {C - 1}}\quad {a_{n}{c_{n}\left( {x,y} \right)}}}} & (4) \end{matrix}$

[0073] where:

[0074] C is the number of image channels,

[0075] c_(n) is the n^(th) color channel of the image i(x,y)

[0076] α_(n) is the coefficient weighing factor for the n^(th) color channel. The sum of all the coefficient weighting factors is preferably 1.0.

[0077] In the case of an image i(x,y) having red, green, and blue channels, the preferred values for the red, green, and blue coefficient weighting factors are all equally ⅓. Assuming the input image is a color image consisting of red, green, and blue color channels, a matrix is first applied to the image in order to produce a luminance channel and two or more color difference channels. Next the unsharp mask process is applied to the luminance channel via the sharpener 6. Finally, an inverse matrix is applied to the luminance and color difference channels to generate an enhanced color image having red green and blue channels.

[0078] A second embodiment of the present invention is shown in FIG. 3. In this embodiment, the original image 2 i(x,y) is input to a path applicator 14, along with an image processing path 10. The path applicator 14 modifies the original image 2 i(x,y) using the image processing path 10, in order to create a rendered image 16 R(x,y). The original image 2, a digitization of film, is not suitable for an output device such as a CRT monitor or a printer. The image processing path applicator 14 applies an image processing path 10 (a series of image transforms) for the purpose of creating a rendered image 16 R(x,y).

[0079] Referring to FIG. 4, an image processing path 10 includes one or more image transforms 20 _(1−M). An image transform 20 is an operation that accepts an input image and possibly control parameters, and in a repeatable fashion, generates an output image. Referring to FIG. 5, an example image processing path 10 is shown. This exemplary image processing path 10 composed of image transforms 20 _(m) designed to create a rendered image that is a photographic print from an input image that is a digital scan of a photographic negative. Examples of such image processing paths 10 are disclosed in U.S. Pat. No. 6,097,470 and 6,097,471, both issued Aug. 1, 2000, to Buhr et al. The image processing path 10 includes an imaging device response linearizer 42 that applies compensation for non-linearities in the response of the imaging device. A method of correcting for the non-linearities in the response of photographic film may be implemented if the digital image is of film origin. Such a method is described in U.S. Pat. No. 5,134,573 issued Jul. 28, 1992 to Goodwin. The image processing 10 path also includes a balance applicator 44 that applies a scene balance algorithm to the image. Image balancing is often performed by a scene balance algorithm (SBA) or automatic exposure determination algorithm (such as are used in high speed optical printers or in a Photo-CD scanner, see for example U.S. Pat. No. 4,945,406 issued Jul. 31, 1990 to Cok). Also, the image processing path includes a contrast adjuster 46 that determines and applies tonal modifications to the image. The contrast of the image may be estimated by an automatic algorithm. In addition, the contrast of the digital image may likewise be modified to a preferred level of contrast. An example of an algorithm that estimates image contrast and provides a means of adjusting the contrast of the image is described in U.S. Pat. No. 5,822,453 issued Oct. 13, 1998 to Lee et al. Finally, the image processing path 10 also includes a renderer 48 such as described in U.S. Pat. No. 6,097,470 issued Aug. 1, 2000 to Buhr et al. Rendering either a digital or optical image can with good accuracy be represented by a LUT (either one, three, or multi-dimensional.) For example, FIG. 6 shows the graph of a LUT that relates image pixel values to code values of an 8-bit printer, although those skilled in the art will recognize that many output image metrics may be used as the rendering space (for example, sRGB is common for viewing images on a computer monitor.)

[0080] Referring again to FIG. 3, the LUT generator 4 is identical to the previous description of the LUT generator 4. The gain determiner 8 receives the original image 2 i(x,y) and the gain LUT output from the LUT generator 4. The gain determiner 8 determines and outputs, for each pixel location (x,y) of the image, the appropriate gain factor β(x,y). This gain factor is found simply by performing a table look-up on the pixel values of the original image.

β(x,y)=β_(LUT) [i(x,y)],  (5)

[0081] The gain determiner 8 preferably performs a blurring operation (using either the lowpass filter b(x,y) or a different lowpass filter) on the original image before doing the table look-up.

[0082] The sharpener 12 then receives the rendered image R(x,y) and the gain factors β(x,y) from the gain determiner 8, and outputs a sharpened rendered image 18.

[0083] This embodiment enables the sharpening (of D_(min) regions less than other regions to avoid unnecessary noise amplification) of a rendered image R(x,y) having pixel values whose relationship to the original film D_(min) may not be straight forward by using the original image i(x,y) to determine appropriate gain factors β(x,y).

[0084] Therefore, the operation of the sharpener 12 of the second embodiment shown in FIG. 3 can be represented with the following equation:

s(x,y)=R(x,y)**b(x,y)+β(x,y)f(R(x,y)−R(x,y)**b(x,y))  (6)

[0085] where:

[0086] s(x,y)=output image with enhanced sharpness without amplifying D_(min) noise

[0087] R(x,y)=rendered digital image 16

[0088] b(x,y)=lowpass filter (described above)

[0089] β(x,y)=unsharp mask gain factor for location (x,y). Preferably in the second embodiment, the gain factor is found with β(x,y)=β_(LUT)[i(x,y)**b(x,y)],

[0090] where β_(LUT)[ ] is a look-up-table of gain factors and

[0091] i(x,y) is the original image 2.

[0092] f( )=fringe function

[0093] R(x,y)**b(x,y)=lowpass image (also called unsharp image)

[0094] R(x,y)−R(x,y)**b(x,y)=highpass image

[0095] ** denotes two dimensional convolution

[0096] (x,y) denotes the x^(th) row and the y^(th) column of an image

[0097] The previous embodiment has the advantage that a rendered image can still be sharpened such that the D_(min) noise is not excessively amplified. However, the method requires that the original image and the rendered image must both exist at the same time. In some systems, this is inconvenient. FIG. 7 illustrates the third and preferred embodiment for applying sharpening to a rendered image in such a manner that the D_(min) noise is not excessively amplified.

[0098] The LUT generator 4 is as previously described. The gain LUT β_(LUT[ ])is then input, along with the image processing path 10, to the LUT propagator 24. The LUT propagator 24 propagates the gain LUT β_(LUT)[ ] through the image transforms 20 _(1−M) of the image processing path 10 and outputs a rendered gain LUT β_(R) _(—) _(LUT[ ]) for producing rendered gain factors corresponding to the pixel code values of the rendered digital image 16 R(x,y).

[0099] Rendered gain LUTs, β_(R) _(—) _(LUT[ ]), originating from a common gain LUT β_(LUT[ ]), can appear quite different depending on the image transforms 20 _(1−M) of the image processing path 10. For example, consider an image processing path consisting of two image transforms 20, a balance operation followed by a rendering tone scale operation that was already shown in FIG. 5. A balance shift (additive offset for each pixel value of the digital image) for an underexposed original image is, for example, 800. A balance shift for a normally exposed original image is, for example, 0. FIGS. 8a and 8 b show the resulting rendered gain LUTs for the underexposed image and the normally exposed image. The results are as expected: the rendered image created from the underexposed image will be sharpened less in the lower code values. However, the rendered image created from the normally exposed image can be sharpened more over a wider range of code values, since the D_(min) region from the original image will be very dark (i.e. low code value) in the rendered image.

[0100] Referring back to FIG. 7, the LUT propagator 24 operates by propagating the gain LUT β_(LUT[ ]) through each image transform of the image processing path 10 that is used to generate the rendered digital image from the original digital image. Propagation through a balance shift or LUT image transform occurs as follows:

β_(P) _(—) _(LUT) [w]=β _(LUT) [v]  (7)

[0101] Where

[0102] β_(P) _(—) _(LUT)[x] is a gain LUT, propagated through image transform T

[0103] w=T(v)

[0104] v is an input value to the image transform T,

[0105] w is the output value from the image transform T.

[0106] Propagation of the gain LUT continues in a manner shown above, propagating the gain LUT through one transform at a time to create the rendered gain LUT β_(R) _(—) _(LUT[ ]) from the original gain LUT, according to the image transforms of the image processing path. Note that it is possible to combine several image transforms into a single image transform before propagating. In addition, when the gain LUT has been propagated through the final image transform of the image processing chain, then the rendered gain LUT β_(R) _(—) _(LUT[ ]) is equivalent to the last propagated gain LUT β_(P) _(—) _(LUT[ ]).

[0107] In a preferred embodiment, certain image transforms 20 have little or no impact on the propagated D_(min) value, and thus may be skipped or omitted when calculating the propagated D_(min) value. For instance, spatial operations such as red eye correction generally do not modify the value of D_(min) and may be omitted. Other, more complicated image transforms 20, such as object recognition do not affect the propagated value of D_(min) and may also be ignored. These ignored image transforms are not relevant to the propagated D_(min) value.

[0108] Those skilled in the art will recognize that the LUT propagator 24 could also operate by propagating only certain control parameters through the image processing path, and then the rendered gain LUT could be constructed using a mathematical formula similar to Equation (1). For example, X_(min) and X_(max) could be propagated through the image processing path simply by applying each image transform of the image processing path to the values of X_(min) and X_(max) as if they were the values of two pixels of an image undergoing modification by the image processing path. The result of this process would be a rendered version of X_(min) and X_(max), X_(minR) and X_(maxR), respectively. The LUT propagator 24 would then construct the rendered gain control LUT β_(R) _(—) _(LUT[ ]) simply by evaluating Equation (1), substituting X_(minR) for X_(min) and substituting X_(maxR) for X_(max).

[0109] Referring again to FIG. 7, the original image 2 i(x,y) is input to a path applicator 14, along with an image processing path 10. The path applicator 14 modifies the original image 2 i(x,y) using the image processing path 14, in order to create a rendered image 16 R(x,y), as was disclosed above.

[0110] The sharpener 12 then inputs the rendered image 16 R(x,y) and the rendered gain LUT β_(R) _(—) _(LUT[ ]) from the LUT propagator 24 and produces a sharpened rendered image 18. This embodiment enables the sharpening (of D_(min) regions less than other regions to avoid unnecessary noise amplification) of a rendered image having pixel values whose relationship to the original film D_(min) may not be straight forward.

[0111] The operation of the sharpener 6 in the third embodiment can be represented with the following equation:

s(x,y)=R(x,y)**b(x,y)+β(x,y)f(R(x,y)−R(x,y)**b(x,y))  (8)

[0112] where:

[0113] s(x,y)=output image with enhanced sharpness without amplifying D_(min) noise

[0114] R(x,y)=rendered digital image

[0115] b(x,y)=lowpass filter (described above)

[0116] β(x,y)=unsharp mask gain factor for location (x,y). Preferably in the second embodiment, the gain factor is found with

β(x,y)=β_(R) _(—) _(LUT) [R(x,y)**b(x,y)],

[0117] f( )=fringe function

[0118] R(x,y)**b(x,y)=lowpass image (also called unsharp image)

[0119] R(x,y)−R(x,y)**b(x,y)=highpass image

[0120] ** denotes two dimensional convolution

[0121] (x,y) denotes the x^(th) row and the y^(th) column of an image

[0122] Those skilled in the art will recognize that there are several methods by which unsharp masking (such as provided by Eq. (2)) can be applied to a color image having multiple channels. For example, the unsharp mask process can be applied to each channel of the color image. Preferably, the unsharp mask process is applied in the following manner, commonly known in the art.

[0123] Assuming the input image is a color image consisting of red, green, and blue color channels, a matrix is first applied to the image in order to produce a luminance channel and two or more color difference channels. Next the unsharp mask process is applied to the luminance channel. Finally, an inverse matrix is applied to the luminance and color difference channels to generate an enhanced color image having red, green, and blue channels.

[0124] Alternatively, the unsharp mask process may be applied to only a single image channel (e.g. the green channel), and the modified highpass data may be summed with each color channel in order to generate an enhanced color image. These and other similar modifications and enhancements to the unsharp mask process would be well understood by those of skill in this art. Since the particularities of their usage are not fundamentally related to the method of selecting sharpening parameters for the variable gain sharpening, their particular application does not act in any way to limit the scope of the invention.

[0125] Those skilled in the art will also recognize that although Eq. (2) and the present invention generally describe the sharpening applied to the image as being performed by an unsharp mask, that is not necessarily the case. Assuming the fringe function f( ) of Eq. (2) is identity, the unsharp mask process can be reconfigured as a single filter than can be applied with convolution to the image and produce results identical to the unsharp mask. For example, suppose the filter coefficients of b(x,y) are given as: $\begin{matrix} {{b\left( {x,y} \right)} = {\frac{\begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 1 \end{bmatrix}}{16}.}} & (9) \end{matrix}$

[0126] Application of a filter c(x,y) with a convolution having coefficients given as $\begin{matrix} {{c\left( {x,y} \right)} = \frac{\begin{bmatrix} {1 - \beta} & {2\left( {1 - \beta} \right)} & {1 - \beta} \\ {2\left( {1 - \beta} \right)} & {4\left( {1 + {3\beta}} \right)} & {2\left( {1 - \beta} \right)} \\ {1 - \beta} & {2\left( {1 - \beta} \right)} & {1 - \beta} \end{bmatrix}}{16}} & (10) \end{matrix}$

[0127] will produce identical results compared with using filter b(x,y) in the unsharp mask of Equation (2). Such modifications to the preferred embodiment by the grouping of operations in the image sharpener 6 such as can be determined by methods well known in algebra and digital signal processing will be evident to those of skill in this art and are within the scope of the present invention.

[0128] The present invention has been described with reference to a preferred embodiment. Changes may be made to the preferred embodiment without deviating from the scope of the present invention. For example, a similar approach can be applied to digital image capture systems, such as digital cameras, where the lowest possible pixel values that can be produced by the image capture system are referred to a D_(min).

Parts List

[0129]2 original image i(x,y)

[0130]4 LUT generator

[0131]6 sharpener

[0132]8 gain determiner

[0133]10 image processing path

[0134]12 sharpener

[0135]14 path applicator

[0136]16 rendered image R(x,y)

[0137]18 sharpened rendered image

[0138]20 _(1−M) image transforms

[0139]22 sharpened image

[0140]24 LUT propagator

[0141]42 imaging device response linearizer

[0142]44 balance applicator

[0143]46 contrast adjustor

[0144]48 renderer 

What is claimed is:
 1. A method of sharpening a digital image having image pixels values, comprising the steps of: a) determining a D_(min) value, representing a value corresponding to a minimum possible exposure for a system that produced the digital image; b) for each pixel value in the digital image providing a gain factor that is dependent on the difference between the pixel value and the D_(min) value, such that pixel values nearer the D_(min) value have smaller gain factors; and c) using the gain factors to sharpen the digital image.
 2. The method of sharpening a digital image claimed in claim 1, further comprising the steps of: a) applying an image processing path including one or more image transforms to the digital image resulting in a rendered digital image; b) using the gain factors to sharpen the rendered digital image.
 3. The method of sharpening a digital image claimed in claim 1, further comprising the steps of: a) applying an image processing path including one or more image transforms to the original digital image resulting in a rendered digital image; b) applying the image processing path to the gain factors to form rendered gain factors; and c) using the rendered gain factors to sharpen the rendered digital image.
 4. The method claimed in claim 1, wherein the gain factors are provided by a lookup table that models a monotonic function of pixel value.
 5. The method claimed in claim 4, wherein the monotonic function is increasing from the D_(min) value to a predetermined pixel value and constant for pixel values that exceed the predetermined pixel value.
 6. A computer program product for performing the method claimed in claim
 1. 7. The computer program product claimed in claim 6, wherein the method further comprises the steps of: a) applying an image processing path including one or more image transforms to the original digital image, resulting in a rendered digital image; and b) using the gain factors to sharpen the rendered digital image.
 8. The computer program product claimed in claim 6, wherein the method further comprises the steps of: a) applying an image processing path including one or more image transforms to the original digital image, resulting in a rendered digital image; b) applying the image processing path to the gain factors to form rendered gain factors; and c) using the rendered gain factors to sharpen the rendered digital image.
 9. The computer program product claimed in claim 6, wherein the gain factors are provided by a lookup table that models a monotonic function of pixel value
 10. The computer program product claimed in claim 9, wherein the monotonic function is increasing from the D_(min) value to a predetermined pixel value and constant for pixel values that exceed the predetermined pixel value. 